﻿from django.conf.urls.defaults import *
#from django.contrib.auth.views import login, logout
from django.contrib import admin
from django.conf import settings


admin.autodiscover()

urlpatterns = patterns('',
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    (r'^admin/', include(admin.site.urls)),
    #
    (r'^shm/', include('ktit.shm.urls')),

    (r'^storage/', include('ktit.sklad.urls')),
    (r'^profile/', include('userprofile.urls')),
    (r'^location/', include('location.urls')),
    (r'^echo/', include('echo.urls')),
    (r'^wiki/', include('simplewiki.urls')),
    (r'^hd/', include('helpdesk.urls')),
    (r'^pcadmin/', include('pcadmin.urls')),

    #
    (r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'login/login.html'}),
    (r'^logout/$', 'django.contrib.auth.views.logout', {'template_name': 'login/logout.html'}),   
    #
    (r'^test/', include('index.urls')),
    (r'^$', 'index.views.index'),
)

if settings.DEBUG:
    urlpatterns += patterns('',
        (r'media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'D:/srv/www/django/ktit/media'}),
    )    
    urlpatterns += patterns('django.contrib.staticfiles.views',
        url(r'^static/(?P<path>.*)$', 'serve'),
    )        


